package com.zjmzxfzhl.modules.purchase.controller.vo;

import com.zjmzxfzhl.modules.purchase.entity.PurchaseIndent;
import com.zjmzxfzhl.modules.purchase.entity.PurchaseOrder;
import com.zjmzxfzhl.modules.purchase.entity.PurchaseSupplier;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.validation.constraints.NotNull;

/**
 * 【】实体类
 *
 * @author 庄金明
 */
@Getter
@Setter
@NoArgsConstructor
public class PurchaseIndentVo {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private Long id;

    /**
     * 采购订单编号
     */
    @NotNull
    private String indentCode;

    private Long orderId;

    private String orderCode;

    private Long supplierId;

    private String supplierName;

    private Long contractId;

    /**
     * 备注
     */
    private String indentComment;


    public PurchaseIndentVo(PurchaseIndent purchaseIndent, PurchaseOrder purchaseOrder, PurchaseSupplier purchaseSupplier) {
        this.id = purchaseIndent.getId();
        this.indentCode = purchaseIndent.getIndentCode();
        this.indentComment = purchaseIndent.getProjectComment();
        this.orderId = purchaseOrder.getId();
        this.orderCode = purchaseOrder.getOrderCode();
        this.supplierId = purchaseSupplier.getId();
        this.supplierName = purchaseSupplier.getSupplierName();
    }
}
